<!DOCTYPE HTML>
<html>
<head>
<title>Product Description</title>
<link rel="stylesheet" href={{url_for('static', filename='css/productDescription.css')}} />
<link rel="stylesheet" href={{ url_for('static', filename='css/topStyle.css')}} />
</head>
<body>
<div id="title">
	<a href="/">
		<img id="logo" src= {{ url_for('static', filename='images/logo.png') }} />
	</a>
	<form>
		<input id="searchBox" type="text" name="searchQuery">
		<input id="searchButton" type="submit" value="Search">
	</form>

	{% if not loggedIn %}
	<div id="signInButton">
		<a class="link" href="/loginForm">Sign In</a>
	</div>
	{% else %}
	<div class="dropdown">
		<button class="dropbtn">Hello, <br>{{firstName}}</button>
		<div class="dropdown-content">
			<a href="/account/orders">Your orders</a>
			<a href="/account/profile">Your profile</a>
			<hr>
			<a href="/logout">Sign Out</a>
		</div>
	</div>
	{% endif %}
	<div id="kart">
		<a class="link" href="/cart">
			<img src={{url_for('static', filename='images/shoppingCart.png')}} id="cartIcon" />
			CART {{noOfItems}}
		</a>
	</div>
</div>
<div id="display">
	<div id="productName">
		<h1>{{data[1]}}</h1>
	</div>
	<div>
		<img src={{url_for('static', filename='uploads/'+data[4]) }} id="productImage"/>
	</div>

	<div id="productDescription">
		<h2>Details</h2>
		<table id="descriptionTable">
			<tr>
				<td>Name</td>
				<td>{{data[1]}}</td>
			</tr>
			<tr>
				<td>Price</td>
				<td>${{data[2]}}</td>
			</tr>
			<tr>
				<td>Stock</td>
				<td>{{data[5]}}</td>
			</tr>
		</table>
		<h2>Description</h2>
		<p>{{data[3]}}</p>
	</div>
	<div id="addToCart">
		<a href="/addToCart?productId={{request.args.get('productId')}}">Add to Cart</a>
	</div>
</div>
</body>
</html>

